package com.itheima.service.impl;

import com.itheima.dao.impl.StudentDaoImpl;
import com.itheima.domain.Student;
import com.itheima.service.StudentService;

import java.util.ArrayList;

public class StudentSerivceImpl implements StudentService {
    @Override
    public void addStudent(Student student) {
        studentDao.addStudent(student);
    }

    @Override
    public void delectStudent(int index) {
        studentDao.delectStudent(index);
    }

    @Override
    public void updateStudent(int index, Student student) {
        studentDao.updateStudent(index,student);
    }

    @Override
    public ArrayList<Student> findAllStudent() {
        return studentDao.findAllStudent();
    }

    @Override
    public int findStudentById(String id) {
        return studentDao.findStudentById(id);
    }
}
